<?php
/**
 * (commands) 解析临时表数据
 */
namespace App\Console\Commands\MonthlyReportLT;

use App\Logic\MonthlyReportLT\ParseTmp\ParseWork;
use Illuminate\Console\Command;
class PaymentParse extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'lt-payment:parse-tmp {date=null}';

    /**
     * The console command description.
     * 解析财务上传的月销售报表核算文件
     * @var string
     */
    protected $description = 'parse tmp to lt payment';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     */
    public function handle()
    {
        $date = $this->argument('date');
        $model = $this->choice('choice exe item: ', ['sa', 're', 'th', 's-fee','cancel-fee']);
        ParseWork::parse($model,$date);
        $this->info($model.' exe success!');
        die('finish');
    }
}
